﻿#region Copyright and License Notice
// Copyright (C)2010-2016 - Rob Levine and other contributors
// http://configgen.codeplex.com
// 
// This file is part of ConfigGen.
// 
// ConfigGen is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
// 
// ConfigGen is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License and 
// the GNU Lesser General Public License along with ConfigGen.  
// If not, see <http://www.gnu.org/licenses/>
#endregion

using System.IO;
using System.Xml;

namespace ConfigGen.Utilities.Xml
{
   /// <summary>
   /// Delegate defining the signature of the "on copy" callback function, used to control copying in the <see cref="XmlReaderToWriterCopier"/> class.
   /// </summary>
    /// <param name="nodeType">Type of current node about to be copied</param>
    /// <param name="reader">The xml reader, reading from the source stream</param>
    /// <param name="readerStream">The source stream that underlies the reader</param>
    /// <param name="writer">The xml writer, writing to the destination stream</param>
    /// <param name="writerStream">The destination stream that underlies the writer</param>
    /// <returns>True to indicate the current node should be copied from the source to the destination, otherwise false.</returns>
    public delegate bool OnCopyCallback(XmlNodeType nodeType, XmlReader reader, Stream readerStream, XmlWriter writer, Stream writerStream);
}